package com.cloudlinkscm.base.filecenter.client.config;

import com.cloudlinkscm.loms.framework.cloud.feign.GenericFeignClientConfiguration;
import feign.Logger;
import feign.codec.Encoder;
import feign.form.spring.SpringFormEncoder;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Profile;

/**
 * @author : tac
 * @date : 2017/7/26
 */

public class FileCenterFeignClientConfiguration extends GenericFeignClientConfiguration {
    @Bean
    @Profile(value = {"dev", "test"})
    public Logger.Level level(){
        return Logger.Level.FULL;
    }

    @Bean
    public Encoder feignEncoder(){
        Encoder delegate = super.feignEncoder();
        return new SpringFormEncoder(delegate);
    }
}
